﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html>

<html ng-app ng-controller="PhoneListCtrl">
<head >
   
    <title></title>
    <script src="angular.js"></script>
    <script src="angular.min.js"></script>
    <script src="controller.js"></script>
</head>
<body>
Search: <input ng-model="query">
Sort by:
<select ng-model="orderProp">
  <option value="name">按字母顺序排列的</option>
  <option value="age">最新的</option>
</select>


<ul class="phones" >
  <li ng-repeat="phone in phones | filter:query | orderBy:orderProp">
    {{phone.name}}
    <p>{{phone.snippet}}{{phone.age}}</p>
  </li>
</ul>
    <script>
        function PhoneListCtrl($scope) {
            $scope.phones = [
            {
                "name": "Nexus S",
                "snippet": "Fast just got faster with Nexus S.",
                "age": 0
            },
    {
        "name": "Motorola XOOM™ with Wi-Fi",
        "snippet": "The Next, Next Generation tablet.",
        "age": 1
    },
    {
        "name": "MOTOROLA XOOM™",
        "snippet": "The Next, Next Generation tablet.",
        "age": 2
    }];

             $scope.orderProp = 'age';
        }
    </script>
</body>
</html>
